﻿using Code;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Models {
    public class Notice {

        [DisplayName("编号")]
        public long Id { get; set; }

        [Required, Column("NoticeName", TypeName = "varchar(20)")]
        [DisplayName("标题")]
        public string Name { get; set; }

        [Column("NoticeImg", TypeName = "varchar(200)")]
        [DisplayName("封面图")]
        [List("", "", Templet = "#imgTpl")]
        public string ImgUrl { get; set; }

        [Column("NoticeContent", TypeName = "text")]
        public string Content { get; set; }


        [Column("NoticeType", TypeName = "smallint")]
        public NoticeType NoticeType { get; set; }

        [Column("CreateTime", TypeName = "datetime")]
        [DisplayName("创建时间")]
        public DateTime CreateTime { get; set; } = DateTime.Now;
    }
}
